package Fruit1;

public class FruitTest {
    public static void main(String[] args) {
        Fruit grape = new Grape();
        grape.setName("葡萄");
        grape .setArea("云南");
        grape .setPrice(9.9);
        grape.setType("阳光玫瑰");

        Fruit banana = new Banana();
        banana.setName("香蕉");
        banana.setArea("西双版纳");
        banana.setPrice(2.99);
        banana.setType("小香蕉");

        Apple apple = new Apple();
        apple.setName("苹果");
        apple.setArea("昭通");
        apple.setPrice(4.99);
        apple.setType("青苹果");

        System.out.println("水果名：" +grape.getName() + "，出产地：" +grape.getArea() + "，品种：" + grape.getType() + "，价格：" + grape.getPrice() + "元/斤");
        System.out.println("水果名：" + banana.getName() + "，出产地：" + banana.getArea() + "，品种：" + banana.getType() + "，价格：" + banana.getPrice() + "元/斤");
        System.out.println("水果名：" +apple.getName() + "，出产地：" + apple.getArea() + "，品种：" + apple.getType() + "，价格：" +apple.getPrice() + "元/斤");
    }
    }

